{% extends "default.html" %}

{% load i18n %}

{% block title %}
{% if update %}{% trans "Edit" %} {% trans "Advertizer" %}
{% else %}{% trans "Register new advertizer" %}{% endif %}
{% endblock %}

{% block page_title %}
{% if update %}{% trans "Edit" %} {% trans "Advertizer" %}
{% else %}{% trans "Register new advertizer" %}{% endif %}
{% endblock %}

{% block page_content %}

{% if error %}
<div style="color: red;">
{{ error }}
</div>
{% endif %}

<form
	{% if update %}
	action="/ads/advertizer/update/{{ object_id }}/"
	{% else %}
	action="/ads/advertizer/register/"
	{% endif %} 
	method="post">
<input type="hidden" name="return" value="{{ redirect_url }}"/>

{% for field in form %}
<div class="form_field_wrapper">
	{% if field.errors %}
	<div class="form_field_error">{{ field.errors }}</div>
	{% endif %}
	<div class="form_field">
		<div class="form_field_label">
			<label>{{ field.label_tag }}:</label>
		</div>
		<div class="form_field_input">
			{{ field }}
		</div> 
		<br class="clear" />
	</div>
</div>
{% endfor %}

	<br class="clear"/>
	<div class="form_buttons">
		<input type="submit" value='{% trans "Save" %}' class="form_button" />
	</div>
</form>
{% endblock page_content %}
